package com.hch.datastructure.lru;

/**
 * @author HeCongHui
 * @date 2022/6/23 17:11
 */
public class Node {
    private int key, val;
    private Node next, pre;

    public Node(int key, int val) {
        this.key = key;
        this.val = val;
    }

    public Node(int key, int val, Node next, Node pre) {
        this.key = key;
        this.val = val;
        this.next = next;
        this.pre = pre;
    }

    public int getKey() {
        return key;
    }

    public void setKey(int key) {
        this.key = key;
    }

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public Node getNext() {
        return next;
    }

    public void setNext(Node next) {
        this.next = next;
    }

    public Node getPre() {
        return pre;
    }

    public void setPre(Node pre) {
        this.pre = pre;
    }
}
